package cn.edu.zzuli.message.news.mapper;

import cn.edu.zzuli.model.dto.WeMessage;
import cn.edu.zzuli.model.entity.OfferOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OfferMessageMapper extends BaseMapper<OfferOrder> {

    //获取昵称和标题
    @Select("select nick_name,title from user join offer_order where uid = ouid " +
            "and uid = #{uid} and oid = #{id}")
    WeMessage getNickNameAndTitle(@Param("uid") int uid, @Param("id")int id);
}

